i;s;
main()
{
	char c[310];
	sprintf(c,"%.lf",pow(2,1000));
	for(;c[i];s+=c[i++]-48);
	printf("%d",s);
}
